package com.sun.audit.loader.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sun.audit.loader.EntitySnapshotLoader;


/**
 * @author pytho
 */
public class MpSnapshotLoader implements EntitySnapshotLoader {

    private final BaseMapper<?> baseMapper;

    public MpSnapshotLoader(BaseMapper<?> baseMapper) {
        this.baseMapper = baseMapper;
    }

    @Override
    public Object load(Class<?> entityClass, Long entityId) {
        return baseMapper.selectById(entityId);
    }
}
